<html>
<body>
    <h2>Hello</h2>
    <script>
    function printH2() {
        console.log('first script', document.querySelectorAll('h2'));
    }
    printH2()
    setTimeout(printH2)
    </script>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/4.0.0-alpha.4/css/bootstrap.css">
    <h2>World</h2>
    <script>
    console.log('second script');
    </script>
</body>
</html>